package com.lswms.service;

import com.lswms.common.page.PageInfo;
import com.lswms.common.page.PageRequest;
import com.lswms.common.service.CrudService;
import com.lswms.dto.YnSignRecordDTO;
import com.lswms.dto.vo.req.SignListReq;
import com.lswms.dto.vo.req.SignRecordListReq;
import com.lswms.dto.vo.resp.BeatSignResp;
import com.lswms.dto.vo.resp.SignListResp;
import com.lswms.entity.YnSignRecordEntity;
import com.lswms.entity.YnUserEntity;

import java.util.List;

/**
 * 挑战记录表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2020-05-06
 */
public interface YnSignRecordService extends CrudService<YnSignRecordEntity, YnSignRecordDTO> {

	/**
	 * 查询是否参加本期挑战
	 * @param ynuser
	 * @return
	 */
	public List<YnSignRecordEntity> querySign(YnUserEntity ynuser);
	/**
	 * 查询挑战记录
	 * @param ynuser
	 * @return
	 */
	public List<YnSignRecordEntity> queryUserSign(String signNo,String type,Long userId,String yesnoRead);
	
	/**
	 * 挑战记录
	 * @param dto
	 * @param ynuser
	 * @return
	 */
	public PageInfo<SignListResp> signList(SignListReq dto,YnUserEntity ynuser);
	
	/**
	 * 查询本期最早打卡、最佳手气、历史最多参与
	 * @param ynuser
	 * @return
	 */
	public BeatSignResp bestTime(String signNo,String type);
	public BeatSignResp bestMoney(String signNo,String type);
	public BeatSignResp bestNum(String signNo,String type);

	public PageInfo<YnSignRecordDTO> listByCondition(SignRecordListReq dto);

}